
if(!i2i_debug_count){
	var i2i_debug_count=1;
}else{
	i2i_debug_count++;
}

document.write('<style>');
document.write('#prtaglink{display:none;}');
document.write('</style>');

if(navigator.userAgent.indexOf("MSIE") != -1
	|| navigator.userAgent.indexOf("Firefox") != -1){

	if(document.getElementById){
		var i2iIllegal=0;
		var i2iNsEmpty=0;
		var i2iTaglink='';
		if(document.getElementById('noscripttags')!=null){
			i2iTaglink+=document.getElementById('noscripttags').innerHTML.toLowerCase();
			if(navigator.userAgent.indexOf("MSIE") != -1){
				if (typeof document.body.style.maxHeight != "undefined") {
					i2iNsEmpty++;
				}
			}
		}else if(document.documentElement.innerHTML.match(/<meta.*homepage builder.*>/gi)!==null){
			i2iNsEmpty++;
		}else{
			i2iNsEmpty++;
			i2iIllegal++;
		}
		if(document.getElementById('prtaglink')!=null){
			i2iTaglink+=document.getElementById('prtaglink').innerHTML.toLowerCase();
			if(i2iTaglink==''){
				i2iIllegal++;
			} 
		}else{
			document.write('<span id="prtaglink"></span>');
			i2iIllegal++;
		}

		var i2iRegexImg='';
		var i2iRegexA='';
		if(i2iNsEmpty>0){
			i2iRegexImg=/(<img(( )?src=("|')?http:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=;]*)?("|')?|( )?border=("|')?0?("|')?|( )?alt=("|')?([^=]*)("|')?)+( )?(\/)?>.*){1}/gi;
			i2iRegexA=/(<a(( )+href=("|')?http:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=;]*)?("|')?|( )+target=("|')?_blank("|')?)+( )?(\/)?>.*){1}/gi;
		}else{
			i2iRegexImg=/(<img(( )?src=("|')?http:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=;]*)?("|')?|( )?border=("|')?0?("|')?|( )?alt=("|')?([^=]*)("|')?)+( )?(\/)?>.*){2}/gi;
			i2iRegexA=/(<a(( )+href=("|')?http:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=;]*)?("|')?|( )+target=("|')?_blank("|')?)+( )?(\/)?>.*){2}/gi;
		}

		if(i2iTaglink.search(i2iRegexImg)==-1){
			i2iIllegal++;
		}
		if(i2iTaglink.search(i2iRegexA)==-1){
			i2iIllegal++;
		}
		if(i2iIllegal>0){
			document.getElementById('prtaglink').innerHTML='<a href="http://acc.i2i.jp/?ac_er" target="_blank"><img src="http://img2.i2i.jp/i2i.gif" border="0" /></a>';
			document.write('<img src=http://img2.i2i.jp/illegal.gif?00506158 border=0 alt=i2iIllegal />');
		}
	}
}

var i2iACDefined = true;
var i2i_non_icon_type = 3;

if (typeof(i2iAdDefined) == "undefined"){

function i2iCookieCk(Cname){
	Cfl='0';
	C=document.cookie;
	Cc='';
	
	if(C.length>0){
		Ch=C.indexOf(Cname+'=');
		if(Ch !=-1){
			Ch+=Cname.length+1;
			Th=C.indexOf(';',Ch);
			if(Th==-1)Th=C.length;
			Cc=C.substring(Ch,Th);
		}else{
			Cfl='1';
		}
	}else{
		Cfl='1';
	}
	return[Cfl,Cc];
}

function definedAlert(varID) { 
	if (window[varID]) { 
		return true; 
	}
	return false; 
}

var i2iAdTime = 0,i2iSeoImg=0;

function i2iAdTimer(num){
	ua = navigator.userAgent;
	
	if(num==10){
		i2iAdChange(10);
	}else if(num==3){
		i2iAdChange(3);
		setTimeout("i2iAdTimer(10)",3000);
	}else if(num==2){
		i2iAdChange(2);
		
		if (i2iSeoImg != 1){
			setTimeout("i2iAdTimer(10)",3000);
		}else{
			setTimeout("i2iAdTimer(3)",3000);
		}
	}else if(num==1){
		i2iSeoImg = (i2iGetIdObj('prtaglink') && i2iGetIdObj('i2i-15a675c9be31438acfd-img1'))?1:0;
		
		if (typeof(i2iACDefined) != "undefined"){
			i2iAdChange(1);
		}else{
			i2iAdTime = 0;
		}
		
		setTimeout("i2iAdTimer(2)",i2iAdTime);
	}else{
		setTimeout("i2iAdTimer(1)",4500);
	}
}

function i2iGetIdObj(name){
	return (document.all)?document.all(name):document.getElementById(name);
}

function i2iSetShow(name,isShow){
	var objt = i2iGetIdObj(name);
	if (objt != null){
		objt.style.display= (isShow)?"block":"none";
	}
}

function i2iAdChange(flg){
	var objt;
	
	switch(flg){
	case 1:
		i2iSetShow('i2iAdcon',false);
		i2iSetShow('i2iad3rd',true);
		break;
	case 2:
		i2iSetShow('i2iAdcon',false);
		i2iSetShow('i2iad3rd',false);
		i2iSeoView(1,true);
		break;
	case 3:
		i2iSeoView(2,true);
		break;
	case 10:
	default:
		i2iSeoView(false);
		break;
	}
	
}

function i2iSeoView(num,isShow){
	var isShow1 = isShow
	var isShow2 = isShow;
	
	if (i2iSeoImg == 1){
		if (num == 1){
			isShow2 = false;
		}else{
			isShow1 = false;
		}
	}
	
	i2iSetShow("prtaglink",isShow1);
	i2iSetShow("i2i-15a675c9be31438acfd-img1",isShow2);
}

function i2iAdview(i2i_icon_type){
	if(i2i_icon_type=='2'){
		icon_ichi='right';
		icon_file='04.swf';
	}else if(i2i_icon_type=='3'){
		icon_ichi='left';
		icon_file='03w.swf';
	}else if(i2i_icon_type=='4'){
		icon_ichi='right';
		icon_file='04w.swf';
	}else{
		icon_ichi='left';
		icon_file='03.swf';
	}

		
	i2iAdTime = 30000;
	
	if(i2i_icon_type=='2'){
		icon_ad='http://img.i2i.jp/all/ad/ad_browsergame.gif';
		icon_link='http://ad3.i2i.jp/click.php?ad_id=141';
		icon_img='<img src="http://ad3.i2i.jp/imp.php?ad_id=141">';
	}else if(i2i_icon_type=='3'){
		icon_ad='http://img.i2i.jp/all/ad/ad_browsergame.gif';
		icon_link='http://ad3.i2i.jp/click.php?ad_id=141';
		icon_img='<img src="http://ad3.i2i.jp/imp.php?ad_id=141">';
	}else if(i2i_icon_type=='4'){
		icon_ad='http://img.i2i.jp/all/ad/ad_browsergame.gif';
		icon_link='http://ad3.i2i.jp/click.php?ad_id=141';
		icon_img='<img src="http://ad3.i2i.jp/imp.php?ad_id=141">';
	}else{
		icon_ad='http://img.i2i.jp/all/ad/ad_browsergame.gif';
		icon_link='http://ad3.i2i.jp/click.php?ad_id=141';
		icon_img='<img src="http://ad3.i2i.jp/imp.php?ad_id=141">';
	}


			document.write('<div id="i2iad3rd" style="position:absolute;display:none;top:0px;'+icon_ichi+':0px;width:122px;height:15px;z-index:58473;">');
	document.write('<a href=http://ac6.i2i.jp/bin/getslink.php?00506158&&&'+icon_link+' target="_blank">');
	document.write('<img src='+icon_ad+' border=0></a>');
	document.write(icon_img);
	document.write('</div>');
	
		document.write('<style>');
	document.write('#prtaglink{display:none;position:absolute;width:120px;height:15px;top:0px;'+icon_ichi+':0px;z-index:58473;}');
	document.write('</style>');
	
		document.write('<style>');
	document.write('#i2i-15a675c9be31438acfd-wrap{width:35px!important;height:11px!important;white-space:nowrap!important;display:inline-block!important;}');
	document.write('#i2i-15a675c9be31438acfd-img1{display:none;position:absolute;width:80px;height:15px;top:0px;'+icon_ichi+':0px;z-index:58473;}');
	document.write('</style>');

		document.write('<div id="i2iAdcon" style="position:absolute;top:0px;'+icon_ichi+':0px;width:50px;height:41px;z-index:58473;">');
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="50" height="41" id="03" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="http://img.i2i.jp/all/icon/'+icon_file+'" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="http://img.i2i.jp/all/icon/'+icon_file+'" quality="high" wmode="transparent" bgcolor="#ffffff" width="50" height="41" name="03" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
	document.write('</div>');
}


/////////////////////
var UQname='i2iUpad';
var UQzen='i2iZenkai';
/////////////////////
var i2iAdDefined = true;

if(!definedAlert('HARIconMultiFrag')){
	UQar=i2iCookieCk(UQname);
	UQzenar=i2iCookieCk(UQzen);

	T=new Date;
	Tp=T.getTime()+1000*60*60*24*1;
	T.setTime(Tp);
	Tg=T.toGMTString();

	UQ=0;
	if(UQzenar[0]==1){
		Num=parseInt(1);
		document.cookie=UQname+'='+Num+'; expires='+Tg;
		document.cookie=UQzen+'='+Tp+'; expires='+Tg;

		UQ=parseInt(1);
	}else{
		Num=parseInt(UQar[1]);
		Num++;
		document.cookie=UQname+'='+Num+'; expires='+Tg;

		Nama=Num%1;

		if(Nama==0){
			UQ=parseInt(1);
		}
	}
	
	/////////////////////
	
	if(UQ==1){
		if(!definedAlert('i2i_icon_type')){
			i2i_icon_type=i2i_non_icon_type;
		}
		if(i2i_icon_type==''){
			i2i_icon_type=i2i_non_icon_type;
		}

		i2iAdview(i2i_icon_type);
		
		i2iAdTimer(0);
	}

	HARIconMultiFrag='on';
}

}
ID='00506158';
GID='49.134.178.181.1320372731';
Gtag='';
Uagent='Mozilla%2F5.0%20%28Windows%20NT%206.1%29%20AppleWebKit%2F535.2%20%28KHTML%2C%20like%20Gecko%29%20Chrome%2F15.0.874.106%20Safari%2F535.2';

/////////////////////

function kaigyohosei(str){

	var St=new RegExp('%0A','ig');
	var BB='';
	str=str.replace(St,BB)

	var St=new RegExp('%0D','ig');
	var BB='';
	str=str.replace(St,BB)

	return(str);

}



function iscookie(Cname){
	Cfl='0';
	C=document.cookie;
	Cc='';

	if(C.length>0){
		Ch=C.indexOf(Cname+'=');
		if(Ch !=-1){
			Ch+=Cname.length+1;
			Th=C.indexOf(';',Ch);
			if(Th==-1)Th=C.length;
			Cc=C.substring(Ch,Th);
		}else{
			Cfl='1';
		}
	}else{
		Cfl='1';
	}
	return[Cfl,Cc];
}

/////////////////////
MFname='MFac'+ID;
ACname='ACac'+ID;
UQname='UQac'+ID;
VDname='VDac'+ID;
VCname='VCac'+ID;
/////////////////////

MFar=iscookie(MFname);

if(MFar[0]==1){
	T=new Date;
	T.setTime(T.getTime()+1000*60*60*24*365);
	Tg=T.toGMTString();

	document.cookie=MFname+'='+GID+'; expires='+Tg;
}else{
	GID=MFar[1];
}
/////////////////////
UQ=0;

UQar=iscookie(UQname);
if(UQar[0]==1){
	T=new Date;
	T.setTime(T.getTime()+1000*60*30);
	Tg=T.toGMTString();

	document.cookie=UQname+'='+GID+'; expires='+Tg;
	UQ=parseInt(1);
}else{
	UQ=parseInt(0);
}
/////////////////////
AC=0;

ACar=iscookie(ACname);

T=new Date;
T.setTime(T.getTime()+1000*60*60*24*365);
Tg=T.toGMTString();

//AC=eval(parseInt(ACar[1])+1);
if(isNaN(ACar[1])||ACar[1]==''){
	ACar[1]=0;
}
AC=eval(parseInt(ACar[1])+1);

document.cookie=ACname+'='+AC+'; expires='+Tg;

/////////////////////
VDar=iscookie(VDname);

VD='no_date';
now=parseInt(1320372731);
if(VDar[0]==1){
}else{
	VD=VDar[1];
}

T=new Date;
T.setTime(T.getTime()+1000*60*60*24*365);
Tg=T.toGMTString();
document.cookie=VDname+'='+now+'; expires='+Tg;

/////////////////////
VCar=iscookie(VCname);

VC=0;
if(VCar[0]==1){
}else{
	VC=VCar[1];
}
if(UQ==1){
	VC++;
}else if(VC==0){
	VC==1;
}

T=new Date;
T.setTime(T.getTime()+1000*60*60*24*365);
Tg=T.toGMTString();
document.cookie=VCname+'='+VC+'; expires='+Tg;

/////////////////////

i2iTitle='';
i2iUrl='';
i2iReff='';

i2i_T2=typeof top;

if(Gtag=='off2'){
	i2iReff=escape(document.referrer);
}else if(i2i_T2=='object'){
	i2iReff=escape(top.document.referrer);
}else{
	i2iReff=escape(document.referrer);
}

if(Gtag=='off' || Gtag=='off2'){
	i2iTitle=escape(document.title);
	i2iUrl=escape(document.URL);
}else if(i2i_T2=='object'){
	i2iTitle=escape(top.document.title);
	i2iUrl=escape(top.document.URL);
}else{
	i2iTitle=escape(document.title);
	i2iUrl=escape(document.URL);
}

i2iTitle=kaigyohosei(i2iTitle);

var RT='';
if(screen.height!=undefined&&screen.width!=undefined){
	RT=screen.height+':'+screen.width;
}

Lines=new Array();
Lines[0]='idname='+ID;
Lines[1]='gid='+GID;
Lines[2]='uq='+UQ;
Lines[3]='ac='+AC;
Lines[4]='usra='+Uagent;
Lines[5]='reff='+i2iReff;
Lines[6]='url='+i2iUrl;
Lines[7]='etitle='+i2iTitle;
Lines[8]='rt='+RT;
Lines[9]='vd='+VD;
Lines[10]='vc='+VC;

Line='';
Llen=Lines.length;
for(i=0;i<Llen;i++){
	if(i==Llen-1){
		Line+=Lines[i];
	}else{
		Line+=Lines[i]+'&';
	}
}

document.write('<scr'+'ipt type=text/javascript src=\"http://ac6.i2i.jp/bin/rows.php?'+Line+'\"></scr'+'ipt>');


var mad_client_id='4438';
var mad_group_id='';
document.write('<scr'+'ipt type=text/javascript src="http://send.microad.jp/js/conv0000.js"></scr'+'ipt>');

